package web.service.Impl;

import web.bean.User;
import web.dao.Impl.UserDaoImpl;
import web.dao.UserDao;
import web.service.UserService;

import java.util.List;

public class UserServiceImpl implements UserService {
    UserDao userDao=new UserDaoImpl();
    @Override
    public User login(String username, String password) {
        return userDao.findUserByUserNameAndPassword(username,password);
    }

    @Override
    public User findUserById(Integer id) {
        return userDao.findUserById(id);
    }

    @Override
    public int updateInfo(User user) {
        return userDao.updateInfo(user);
    }

    @Override
    public List<User> selectUser() {
        return userDao.selectUser();
    }
}
